From: Jasper St. Pierre Date: Mon, 18 Mar 2013 17:49:53 +0000 (-0400) Subject: messageTray: Don't show the context-menu when the tray isn't open X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4348 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1bce210c516215ceb78a8b37833ab8140476b959;p=gnome-shell.git messageTray: Don't show the context-menu when the tray isn't open https://bugzilla.gnome.org/show_bug.cgi?id=697709 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 14343cb96..98724c58d 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -1721,6 +1721,9 @@ const MessageTray = new Lang.Class({ this.actor.add_action(clickAction); clickAction.connect('clicked', Lang.bind(this, function(action) { + if (this._trayState != State.SHOWN) + return; + let button = action.get_button(); if (button == 3) this._openContextMenu(); @@ -1731,7 +1734,7 @@ const MessageTray = new Lang.Class({ clickAction.connect('long-press', Lang.bind(this, function(action, actor, state) { switch (state) { case Clutter.LongPressState.QUERY: - return true; + return this._trayState == State.SHOWN; case Clutter.LongPressState.ACTIVATE: this._openContextMenu(); }